package com.delay.queue.controller;

import com.delay.queue.delayedqueue.redisson.DelayMessage;
//import com.delay.queue.delayedqueue.redisson.RedisDelayedQueueManager;
//import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

@RestController
@RequestMapping("/delayed")
public class DelayTaskController {

//    @Autowired
//    private RedisDelayedQueueManager redisDelayedQueueManager;

    @RequestMapping("/message")
    public void addDelayedMessage(Integer delay, String value) {
        DelayMessage delayMessage = new DelayMessage(delay, value);
//        redisDelayedQueueManager.add(value, delay, TimeUnit.SECONDS, "DelayMessage");
    }
}
